package EnumDemo;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/7/16-07-16-14:00
 * @Description：对食物菜单分类，每种菜单下有多种具体的菜式或食品
 */

interface Food{
    enum Appetizer implements Food{      //开胃菜
        SALAD,SOUP,SPRING_ROLLS;
    }
    enum  MainCourse implements Food{      //主菜
        LASAGNE, BURRITO,PAD_THAI,
        LENTILS,HUMMOUS,VINDALOO;
    }
    enum Dessert implements Food{             //点心
        TIRAMISU,GELATO,BLACK_FOREST_CAKE,
        FRUIT,CREME_CARAMEL;
    }
    enum Coffee implements Food{             //咖啡
        BLACK_COFFEE,DECAF_COFFEE,ESPRESSO,
        LATTE,CAPPUCCINO,TEA,HERB_TEA;
    }
}
public class Enum_TypeOfFood {
    public static void main(String[] args) {
        Food food1 = Food.Appetizer.SALAD;
        System.out.println(food1);
        food1 = Food.MainCourse.LASAGNE;
        System.out.println(food1);
        food1 = Food.Dessert.GELATO;
        System.out.println(food1);
        food1 = Food.Coffee.CAPPUCCINO;
        System.out.println(food1);
    }
}
